package TestClasser;
import ModelLayer.Customer;
import DBLayer.DBCustomer;
import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class DBCustomerTest {
        
        private DBCustomer dbObject;
        @Before
        public void setUp() throws Exception {
                dbObject = new DBCustomer();
        }

        @After
        public void tearDown() throws Exception {
        }

        @Test
        public void testFindCustomerID() {
        		System.out.println("Finder en kunde vha. ID.");
                Customer custObject = dbObject.findCustomer(2, false);
                if(custObject != null)
                {
                		System.out.println(custObject.getName());
                		System.out.println("");
                }
                else{
                fail("Not yet implemented");
        }
        }
        @Test
        public void testFindCustomerName() {
        	System.out.println("Finder en kunde vha. kundens navn.");
        	Customer custObject = dbObject.searchCustomerOnName("Peter", false);
        	if(custObject != null);
        	{
        		System.out.println(custObject.getCustomerId());
        	}
        	
        	
        }

}
